

// window.lang = {
//     'zh':{
//         dropDownData:[
//             {
//                 name: 'production',
//                 title: '产品',
//                 activeItem: "production-optometry",
//                 child:[
//                     {
//                         name: 'production-optometry',
//                         title:'满天星验光配镜智能一体机',
//                         summary:'首款真正全面实现验光网络配镜、数据与商城同步联动，定制搭配、护理维修等综合功能的高科技产品，一台满天星验光配镜智能一体机就是一个可移动的、完整的微型眼镜店，实现线上线下联动，推动整个眼镜行业的转型升级。'
//                     },{
//                         name:'production-vending',
//                         title:'自动售卖机',
//                         summary:'满天星眼镜试戴自动售卖机是广州便雅悯视光网络科技有限公司专为眼镜零售量身定制的智能设备，实现了太阳镜、功能镜以及相关护理产品即买、即取、即用的一站式服务，为眼镜零售行业提供全新的解决方案，帮助眼镜零售商提高产品销量，为消费者提供更便捷的选镜配镜服务。'
//                     },{
//                         name:'production-try-on',
//                         title:'试戴购买一体机',
//                         summary:'满天星试戴购买一体机是一款进行眼镜及相关产品销售的高端产品，以逼真的3D实时动态试戴技术为核心，颠覆传统眼镜门店的营销模式，一台满天星试戴购买一体机即可实现眼镜选款选型和购买流程。'
//                     },{
//                         name:'production-wechat',
//                         title:'微信商城',
//                         summary:' 满天星微信商城是业界第一款专门为眼镜销售量身定制的微信商城，提供眼镜行业的微商城在线服务，为商家搭建完整的微信商场系统，线上展示所有眼镜产品，打造互动营销新模式，实现线上价格与线下服务双向联动。'
//                     },{
//                         name:'production-pad',
//                         title:'PAD开店宝',
//                         summary:'满天星开店宝是眼镜实体店商家和开店创业人士的“开店神器”，它完全打破传统眼镜门店的运营模式，为眼镜门店开启新形象。主要包含脸型识别、虚拟试戴、虚拟仓库等系列功能。'
//                     },{
//                         name:'production-interactive',
//                         title:'互动娱乐版',
//                         summary:'互动娱乐版是专为眼镜实体零售商推出的一款线下虚拟试戴软件。新奇、有趣的虚拟试戴体验激发消费者强烈的购买欲望。同时，通过用户主动分享照片到朋友圈，系统可以帮助商家实现品牌免费推广和营销。'
//                     }
//                 ]
//             },
//             {
//                 name: 'service',
//                 title: '服务',
//                 activeItem: "service-try-on",
//                 child:[
//                     {
//                         name: 'service-try-on',
//                         title:'眼镜虚拟试戴解决方案',
//                         summary:'眼镜虚拟试戴是指利用AR技术和人脸识别技术，让用户可以在实体店或智能移动设备看到自己真实的眼镜试戴效果。眼镜虚拟试戴技术能帮助消费者方便快捷地接触海量眼镜产品，通过脸型分析和智能推荐技术满足消费者个性化消费需求。'
//                     },{
//                         name: 'service-custom',
//                         title:'APP/网页定制开发',
//                         summary:'开发者服务专为客户提供定制需求服务，通过平台搭建、试戴接入、数据测量等功能模块的实现，帮助客户建立独立平台进行线上营销，无限扩展业务，最终实现线上线下联动。'
//                     }
//                 ]
//             },
//             {
//                 name: 'experience',
//                 title: '免费体验',
//                 activeItem: "experience-optometry",
//                 child:[
//                     {
//                         name:'experience-optometry',
//                         title: '满天星验光配镜智能系统',
//                         summary:'满天星验光配镜智能系统由PC大屏幕试戴商城系统、pad下单系统、全自动验光设备pad控制系统、满天星微信公众号系统、满天星微信商城系统及后台管理系统六大系统组成。结合智能硬件设备，满天星系统将帮助眼镜商家真正实现线上线下联动营销，获取更大的利润空间。'
//                     },{
//                         name:'experience-try-on',
//                         title:'2.5D眼镜试戴',
//                         summary:'2.5D试戴是在2D试戴技术上的优化升级，消费者上传个人照片即可体验眼镜在线试戴。同时，2.5D试戴支持眼镜局部微调，能更加真实的展现眼镜试戴的局部效果，如镜腿细节。2.5D试戴是眼镜电商实现低成本在线试戴功能的最佳选择。'
//                     }
//                 ]
//             }
//         ]
//     },
//     'en':{
//         dropDownData:[
//             {
//                 name: 'production',
//                 title: 'Product',
//                 activeItem: "production-optometry",
//                 child:[
//                     {
//                         name: 'production-optometry',
//                         title:'All-Star Optometric Combined Glasses Prescription Intelligent Machine',
//                         summary:'The first mobile solution fully integrated optometry, glasses virtual try-on, online shopping and virtual inventory, etc. It equals a micro optical shop. It can complete all tasks from glasses selection, virtual wearing online, payment and eventually with delivery. It bridge the gap between online and offline, and will help make a revolution in the whole spectacle industry.'
//                     },{
//                         name:'production-vending',
//                         title:'All-Star Spectacles Vending Machine',
//                         summary:'All-Star spectacles vending machine has creatively realized one-stop service for glasses consumption. Not only sunglasses, frames, contacts and health care products can be sold on the machine, but also for prescription glasses, if only users know their prescription. It offers a brand new solution for glasses retail industry. It will help the retailers improve their sales and provide customers with more convenient service.'
//                     },{
//                         name:'production-try-on',
//                         title:'All-Star Eyewear Try-On Experience Machine',
//                         summary:'All-Star Eyewear Try-On Experience Machineis an useful tool for glasses and other relative products selling.A 3D Virtual Try-on System could attract and bring a fresh eyewear shopping experience to the customers. It overturns the marketing mode of traditional glasses stores.'
//                     },{
//                         name:'production-wechat',
//                         title:'All-Star Wemall',
//                         summary:' All-Star Wemall is the first specialized Wemall for glasses selling. It includes functional module such as virtual try-on system, interactive marketing, offline service. It takes advantage of social media interaction to help glasses brands sell products online. End customers are enable to enjoy a cheaper price online and high quality service offline.'
//                     },{
//                         name:'production-pad',
//                         title:'All-Star Shopping Helper',
//                         summary:'All-Star Shopping Helperis a portable eyewear virtual try-on pad developed for glasses sellers to improve their business in store. It features functions like face recognition,glasses virtual try-on, virtual warehouse, etc. It is a functional mirror with intelligent shopping guide for the customers.'
//                     },{
//                         name:'production-interactive',
//                         title:'All-Star Interactive Entertainment Software',
//                         summary:'All-Star Interactive Entertainment Software aims to provide customers with an off-line Try-On experience. This innovative and interestingvirtual try-on software will stimulate consumers’ willingness to purchase. In the meantime, it also realizes the virtual advertising for our products.'
//                     }
//                 ]
//             },
//             {
//                 name: 'service',
//                 title: 'Service',
//                 activeItem: "service-try-on",
//                 child:[
//                     {
//                         name: 'service-try-on',
//                         title:'Glasses Virtual Try-on Solution',
//                         summary:'Glasses virtual try-on solution refers to using Augmented Reality technology and Face Recognition technology to make users see realistic virtual glasses effect on intelligent devices in glasses stores. This solution will help consumers to know and try-on glasses products fast and conveniently. In addition, face recognition analysis and intelligent recommendation technology will help consumers find products meeting their own individual requirements. '
//                     },{
//                         name: 'service-custom',
//                         title:'APP/Web Design & Development ',
//                         summary:'We provides all clients with customization service such as virtual try-on technology, facial dimensional measurement, and web/app basic design and development, to help them start business online and bridge the gap between online and offline.'
//                     }
//                 ]
//             },
//             {
//                 name: 'experience',
//                 title: 'Virtual Try-On',
//                 activeItem: "experience-optometry",
//                 child:[
//                     {
//                         name:'experience-optometry',
//                         title: 'All-Star Glasses Virtual Try-on System',
//                         summary:'This system consists of six parts, including an eyewear virtual try-on system on the large LCD screen, an ordering system on the pad, a full automatic optometry controller system , the social media Wechat, a virtual try-on Wemall, and a backstage. It truelly bridges the online and offline glasses sales, and will help the merchants earn bigger profit.'
//                     },{
//                         name:'experience-try-on',
//                         title:'2.5D Glasses Try-On SDK',
//                         summary:'2.5D Glasses Try-On technique provides spectacle business with an low cost online glasses try-on solution. Customers can have realistic experience glasses Try-On right away just by upholding one picture. Meantime, 2.5D Glasses Try-On allows micro-adjustment partially. This function makes virtual wearing effect more realistic and show spectacles in details, e.g. frame legs. '
//                     }
//                 ]
//             }
//         ]
//     }
// };


// new Vue({

//     data: {
//         //默认选择维产品
//         dropDownActiveItem: 'production',
//         dropDown:false,
//         currentUrl:'/',
//         dropDownData: lang[window.country].dropDownData
//     },

//     methods:{
//         //打开下拉列表
//         enterHandle:function(itemname){
//             if ( typeof itemname === "string"){
//                 this.dropDownActiveItem = itemname;
//             }
//             this.dropDown = true;
//         },

//         //关闭下拉列表
//         leaveHandle:function(){
//             this.dropDown = false;
//         },

//         //鼠标移入第三级列表时触发
//         setActiveChildItem:function(childItemName){
//             if ( typeof childItemName === "string"){
//                 this.currentActiveChildItem.activeItem = childItemName;

//             }

//         }
//     },
//     computed: {

//         //  下拉列表第三级列表的数据
//         childNavData: function(){
//            for(var i=0; i<this.dropDownData.length;i++){
//                if( this.dropDownData[i].name === this.dropDownActiveItem ){
//                    return this.dropDownData[i].child;
//                }
//            }
//         },

//         //当前被激活的第三级列表对象
//         currentActiveChildItem:function(){
//             for(var i=0; i<this.dropDownData.length;i++){
//                 if( this.dropDownData[i].name === this.dropDownActiveItem ){
//                     return this.dropDownData[i];
//                 }
//             }、
//         },

//         //文章对象
//         getArticle:function(){
//             for(var i=0; i<this.childNavData.length;i++){
//                 if(this.childNavData[i].name === this.currentActiveChildItem.activeItem){
//                     return this.childNavData[i];
//                 }
//             }
//         }
//     },
//     mounted:function () {
//         this.currentUrl = window.location.href;
//     }
// }).$mount('#header');


// 头部
/* eslint-disable */
new Vue ({
    data: function () {
        return {
            dropDown: false, // 下拉的状态
            currentUrl:'/',
        }
    },

    computed:{
        /**
         * 判断是否为首页
         */
        isHome: function (){
           return !/^\/(technology|case|video|news|about|product)(\/#)?/.test(location.pathname);
        }
    },

    methods: {

        /**
         *  设置下拉的状态为真，打开
         */
        open: function () {
            this.dropDown =  true;
        },
        
        /**
         *  设置下拉的状态为false，关闭
         */
        close: function () {
            this.dropDown =  false;
        },

        /**
         *  获取当前页面的url用于激活导航选项
         */
        getCurrentPageUrl: function () {
            this.currentUrl = window.location.href;
        }

    },

    mounted: function () {
        this.getCurrentPageUrl();
    }
}).$mount('#header');










// 返回顶部
new Vue({
    el:'#aside_box',
    data:{
        isShow: false
    },
    mounted:function(){
        var vm = this;

        //事件节流
        window.addEventListener("scroll",debounce( function(event){

            var scrollTop = document.documentElement.scrollTop ||  document.body.scrollTop;
            if( scrollTop <= 20 ){
                vm.isShow = false;
            }else{
                vm.isShow = true;
            }
        } ,200 ));
    },

    methods:{
        backTop:function(){
            document.body.scrollTop = 0;
        },
        service:function(){
            //alert("ke fu")
        }
    }
});

